<meta charset="UTF-8">
<script>
  //合并两个对象
  function merge(obj1, obj2) {
    let obj2Keys = Object.keys(obj2)
    for (let i = 0; i < obj2Keys.length; i++) {
      obj1[obj2Keys[i]] = obj2[obj2Keys[i]]
    }
    return obj1
  }

  console.log(Object.assign({
    name: 'tom', getName() {
    }
  }, { age: 20, 'gen  _der': '男' }))
</script>
